package com.tac.service.impl;

import com.tac.common.result.Result;
import com.tac.dao.InformationDao;
import com.tac.pojo.Information;
import com.tac.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InformationServiceImpl implements InformationService {

    @Autowired
    private InformationDao informationDao;


    public Result<Information> getInformation(){
        Information information = informationDao.getInformation();
        return Result.success(information);
    }


    public Result update(Information information){
        Integer integer = informationDao.update(information);
        if(integer<=0){
            return Result.error("修改失败");
        }
        return Result.success(null);
    }
}
